﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace CNKI.TPI.Web.Interface.Test
{
    public partial class TestForm : Form
    {
        public TestForm()
        {
            InitializeComponent();
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {

        }

        private void btnSend_Click(object sender, EventArgs e)
        {
            string url = this.textBox1.Text;
            string param = this.textBox2.Text;
            string type = this.comboType.Text;
            string sessionID = this.tbSessionID.Text;
            string domain = this.tbDomain.Text;
            string result = null;
            if ("Get".Equals(type))
            {
                result = BaseAlipayInterface.CallInterfaceGet(url, param, sessionID, domain);
            }
            else if ("Post".Equals(type))
            {
                result = BaseAlipayInterface.CallInterfacePost(url, param, sessionID, domain);
            }
            MessageBox.Show("Finish");
            this.textBox3.Text = result;
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
